home *** CD-ROM | disk | FTP | other *** search
- # Executive-PC Login.cmd
- #
- #trace on
- #
- # set up some strings for dialling up
- #
- if ![load $number]
- if [query $number "Enter your Exec-PC phone number"]
- save $number
- end
- end
- if ![load $username]
- if [username "Enter your Exec-PC PPP username"]
- save $username
- end
- end
- if ![load $password]
- if [password "Enter your Exec-PC password"]
- save $password
- end
- end
- if ![load $init]
- if [init "Enter an Initialization string"]
- save $init
- end
- end
- %attempts = 5
-
-
- # initialize modem
- #
- output $init\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #
- # setup our modem commands
- #
-
- #
- # send phone number
- #
- %n = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output "atdt"$number\13
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- wait 30 dcd
-
- #
- # wait for the username prompt
- #
- input 30 "ogin:"
- output $username\13
- #
- # and the password
- #
- input 30 "sword:"
- output $password\13
- display \n\n
- #
- # we are now logged in
- #
-
-
- display "WAIT, Sending PPP mode command..." \n \n
- input 60 "PPP"
-
- display "...done. Waiting for IP number..." \n \n
-
- #
- # now we are finished.
- #
-